﻿<UserControl x:Class="Coding4Fun.BoxingBots.UserConsole.ringRobot"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
             mc:Ignorable="d" 
             d:DesignHeight="670" d:DesignWidth="670">
    <UserControl.Resources>
        <Storyboard x:Key="sbOpacityPulse">
            <DoubleAnimationUsingKeyFrames Storyboard.TargetProperty="Opacity" Storyboard.TargetName="ImgReverse">
                <SplineDoubleKeyFrame KeyTime="00:00:00" Value="1.0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:00.6" Value="1.0"/>
                <SplineDoubleKeyFrame KeyTime="00:00:01.0" Value="0.0"/>
            </DoubleAnimationUsingKeyFrames>
        </Storyboard>
    </UserControl.Resources>
    <Canvas Width="670" Height="670">
        <Image x:Name="ImgBKG" Source="Images/ringRobotOff.png"/>
        <Image x:Name="ImgReverse" Height="32" Canvas.Left="222" Source="Images/rr0.png" Stretch="Fill" Canvas.Top="26" Width="228" Opacity="0.0"/>
        <Image x:Name="ImgPunchLeft" Height="175" Canvas.Left="394.5" Source="Images/rr1.png" Stretch="Fill" Canvas.Top="49.5" Width="225" Opacity="0.0"/>
        <Image x:Name="ImgStrafeLeft" Height="228" Canvas.Left="597" Source="Images/rr2.png" Stretch="Fill" Canvas.Top="221" Width="47" Opacity="0.0"/>
        <Image x:Name="ImgTurnLeft" Height="265" Canvas.Left="447" Source="Images/rr3.png" Stretch="Fill" Canvas.Top="339.5" Width="181" Opacity="0.0"/>
        <Image x:Name="ImgForward" Height="95" Canvas.Left="121" Source="Images/rr4.png" Stretch="Fill" Canvas.Top="549" Width="429" Opacity="0.0"/>
        <Image x:Name="ImgTurnRight" Height="265" Canvas.Left="42" Source="Images/rr5.png" Stretch="Fill" Canvas.Top="338.5" Width="180" Opacity="0.0"/>
        <Image x:Name="ImgStrafeRight" Height="228" Canvas.Left="26.5" Source="Images/rr6.png" Stretch="Fill" Canvas.Top="221" Width="47" Opacity="0.0"/>
        <Image x:Name="ImgPunchRight" Height="175" Canvas.Left="51" Source="Images/rr7.png" Stretch="Fill" Canvas.Top="49.5" Width="224" Opacity="0.0"/>


        <Canvas x:Name="ImagesToClip" Width="378" Height="374">
            <Canvas.OpacityMask>
                <VisualBrush Visual="{Binding ElementName=allPaths}" Viewbox="0,0,1.0,1.0"/>
            </Canvas.OpacityMask>
            <Image x:Name="ImgDamageRing" Height="670" Source="Images/ringRobotOn_Damage.png" Stretch="Fill" Width="670"/>
        </Canvas>

        <Canvas x:Name="allPaths" Width="670" Height="670" Canvas.Left="-1000" Background="#01000000" ClipToBounds="True">
            <Path Canvas.Left="335" Canvas.Top="335">
                  <Path.RenderTransform>
                    <TransformGroup>
                        <RotateTransform Angle="-90"/>
                    </TransformGroup>
                </Path.RenderTransform>
                <Path.Data>
                    <PathGeometry>
                        <PathFigure x:Name="figure_RingDamage"/>
                    </PathGeometry>
                </Path.Data>
                <Path.Fill>
                    <SolidColorBrush Color="#FF00FF"/>
                </Path.Fill>
            </Path>
        </Canvas>

    </Canvas>
</UserControl>
